     function updateIndicator(currIndex,maxLength){
            if(currIndex == 0){
                $(".btn_prev").css({background:"url(../../images/icon.png) no-repeat -42px 0px"});
                $(".btn_next").css({background:"url(../../images/icon.png) no-repeat -21px 0px"});
            }else if(currIndex >= maxLength -1){
                $(".btn_prev").css({background:"url(../../images/icon.png) no-repeat 1px -0px"});
                $(".btn_next").css({background:"url(../../images/icon.png) no-repeat -65px 0px"});
            }else{
                $(".btn_prev").css({background:"url(../../images/icon.png) no-repeat 0px 0px"});
                $(".btn_next").css({background:"url(../../images/icon.png) no-repeat -21px 0px"});
            }
       }
        $(document).ready(function(){
                //在程序开始，复制一张图片，当做猫腻
              //  $(".tuul li:first").clone().appendTo(".tuul");
            var nowimg = 0;
            $(".btn_next").click(function(e){
                if(nowimg < $(".tuul>li").length - 1){
                    //如果没有到，现实中的最后一张图，则正常轮播
                    nowimg ++;
                    $(".tuul").animate({"left":-960*nowimg},600);
                }
                //$(".in_page li").eq(nowimg).addClass("current").siblings().removeClass("current");
                updateIndicator(nowimg,$(".tuul>li").length);
            });

            $(".btn_prev").click(function(e){
                if(nowimg > 0){
                    //如果现在还没有到最左边一张图，则正常轮播
                    nowimg --;
                    console.log(nowimg);
                    $(".tuul").animate({"left":-960*nowimg},600);
                }else{
                    $(".btn_next").css({background:"url(../../images/icon.png) no-repeat -27px -0px"});
                     $(".btn_prev").css({background:"url(../../images/icon.png) no-repeat 0px -54px"});
                }
               // $(".in_page li").eq(nowimg).addClass("current").siblings().removeClass("current");
                updateIndicator(nowimg,$(".tuul>li").length);
            });
    
        });